package com.feifan.oa.service.impl;

import com.feifan.common.core.text.Convert;
import com.feifan.oa.domain.FlowCategoryInfo;
import com.feifan.oa.mapper.FlowCategoryInfoMapper;
import com.feifan.oa.service.IFlowCategoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 流程类别明细Service业务层处理
 * 
 * @author 非凡
 * @date 2020-06-30
 */
@Service
public class FlowCategoryInfoServiceImpl implements IFlowCategoryInfoService 
{
    @Autowired
    private FlowCategoryInfoMapper flowCategoryInfoMapper;

    /**
     * 查询流程类别明细
     * 
     * @param id 流程类别明细ID
     * @return 流程类别明细
     */
    @Override
    public FlowCategoryInfo selectFlowCategoryInfoById(Long id)
    {
        return flowCategoryInfoMapper.selectFlowCategoryInfoById(id);
    }

    @Override
    public List<FlowCategoryInfo> selectFlowCategoryInfoByFlowCategory(Long id) {
        return flowCategoryInfoMapper.selectFlowCategoryInfoByFlowCategoryId(id);
    }

    /**
     * 查询流程类别明细列表
     * 
     * @param flowCategoryInfo 流程类别明细
     * @return 流程类别明细
     */
    @Override
    public List<FlowCategoryInfo> selectFlowCategoryInfoList(FlowCategoryInfo flowCategoryInfo)
    {
        return flowCategoryInfoMapper.selectFlowCategoryInfoList(flowCategoryInfo);
    }

    /**
     * 新增流程类别明细
     * 
     * @param flowCategoryInfo 流程类别明细
     * @return 结果
     */
    @Override
    public int insertFlowCategoryInfo(FlowCategoryInfo flowCategoryInfo)
    {
        return flowCategoryInfoMapper.insertFlowCategoryInfo(flowCategoryInfo);
    }

    /**
     * 修改流程类别明细
     * 
     * @param flowCategoryInfo 流程类别明细
     * @return 结果
     */
    @Override
    public int updateFlowCategoryInfo(FlowCategoryInfo flowCategoryInfo)
    {
        return flowCategoryInfoMapper.updateFlowCategoryInfo(flowCategoryInfo);
    }

    /**
     * 删除流程类别明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFlowCategoryInfoByIds(String ids)
    {
        return flowCategoryInfoMapper.deleteFlowCategoryInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除流程类别明细信息
     * 
     * @param id 流程类别明细ID
     * @return 结果
     */
    @Override
    public int deleteFlowCategoryInfoById(Long id)
    {
        return flowCategoryInfoMapper.deleteFlowCategoryInfoById(id);
    }
}
